package com.zhongxiangspace.tools;


import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

import java.util.HashMap;
import java.util.Map;


@Configuration
@ConfigurationProperties(prefix="com.zhongxiangspace")
//@PropertySource( value = {"/config/configuration.properties"},encoding = "UTF-8")
@PropertySource(value = {"classpath:/config/configuration.properties"}, ignoreResourceNotFound = true, encoding = "UTF-8")
public class ReadProperties {

    /**
     * 上传图片路径
     */
    private String imagePath;

    private  FreeMarker freeMarker;

    public FreeMarker getFreeMarker() {
        return freeMarker;
    }
    public void setFreeMarker(FreeMarker freeMarker) {
        this.freeMarker = freeMarker;
    }

    public static class FreeMarker{
        private String indexPath;
        private String detailsPath;
        private String detailsTemplateName;
        private String detailsTemplatePath;
        public String getDetailsTemplateName() {
            return detailsTemplateName;
        }
        public void setDetailsTemplateName(String detailsTemplateName) {
            this.detailsTemplateName = detailsTemplateName;
        }

        public String getDetailsTemplatePath() {
            return detailsTemplatePath;
        }

        public void setDetailsTemplatePath(String detailsTemplatePath) {
            this.detailsTemplatePath = detailsTemplatePath;
        }

        public String getIndexPath() {
            return indexPath;
        }

        public void setIndexPath(String indexPath) {
            this.indexPath = indexPath;
        }

        public String getDetailsPath() {
            return detailsPath;
        }

        public void setDetailsPath(String detailsPath) {
            this.detailsPath = detailsPath;
        }
    }
    public String getImagePath() {

        return imagePath;
    }

    public void setImagePath(String imagePath) {
        this.imagePath = imagePath;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("ReadProperties{");
        sb.append("imagePath='").append(imagePath).append('\'');
        sb.append(", freeMarker=").append(freeMarker);
        sb.append('}');
        return sb.toString();
    }
}

